﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            double bull;
            double cow;
            double calf;

            double bullPrice = 10;
            double cowPrice = 5;
            double calfPrice = 0.5;
            double money = 100;
            double totalAmount = 100;



            for (bull = 0; bull <= money / bullPrice; bull++)
            {
                //Console.WriteLine(money/cowPrice);

                for (cow = 0; cow <= money / cowPrice; cow++)
                {
                    for (calf = 0; calf <= money / calfPrice; calf = calf + 2)
                    {
                        double sum = bull * bullPrice + cow * cowPrice + calf * calfPrice;
                        totalAmount = bull + calf + cow;


                        if (100 - sum == 0 && 100 - totalAmount == 0)
                        {
                            Console.WriteLine("Bulls:  " + bull + "  Cows:  " + cow + "  Calves:  " + calf);
                        }


                    }
                }
            }
        }
    }
}